import { createApp } from "vue";
import App from "@/App.vue";
//引入element-plus插件和样式
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
//配置element-plus国际化
//@ts-ignore
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
//引入暗黑模式
import "element-plus/theme-chalk/dark/css-vars.css";
//svg插件需要配置
import "virtual:svg-icons-register";
//引入自定义插件对象：注册整个项目全局组件
import gloalCompoents from "@/components";
//引入全局样式
import "@/styles/index.scss";
//引入路由
import router from "@/router";
//引入仓库
import store from "@/store";
//获取应用实列对象
const app = createApp(App);
//安装element-plus插件
app.use(ElementPlus, {
  locale: zhCn,
});
//安装自定义插件
app.use(gloalCompoents);
//注册模板的路由
app.use(router);
//引入路由鉴权
import "@/permisstion";
//安装仓库
app.use(store);
//将应用挂载到挂载点上
app.mount("#app");
